/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jili.ubert.code.client2server.custom;

import com.baidu.bjf.remoting.protobuf.Codec;
import com.baidu.bjf.remoting.protobuf.ProtobufProxy;
import com.baidu.bjf.remoting.protobuf.annotation.Protobuf;
import java.io.IOException;

/**
 *
 * @author ChengJiLi
 */
public class TestObjectJProtobuf {
    @Protobuf
    public String id;
    @Protobuf
    public BankIntoInvest obj;
    
    public TestObjectJProtobuf(){}
    public TestObjectJProtobuf(String id,BankIntoInvest obj){
        this.id = id;
        this.obj = obj;
    }
    public void setID(String id){
        this.id = id;
    }
    public void setObj(BankIntoInvest obj){
        this.obj = obj;
    }
    public String getID(){
        return id;
    }
    public BankIntoInvest getObj(){
        return obj;
    }
    public byte[] EnCode(TestObjectJProtobuf msg) throws IOException{
        Codec<TestObjectJProtobuf> Lcode = ProtobufProxy.create(TestObjectJProtobuf.class);
        return Lcode.encode(msg);
    }
    public TestObjectJProtobuf DeCode(byte[] data) throws IOException{
        Codec<TestObjectJProtobuf> Lcode = ProtobufProxy.create(TestObjectJProtobuf.class);
        return Lcode.decode(data);
        
    }
}
